import request from '@/utils/request'

// 登录
export const login = data => {
  return request.post('/login', data)
}
/**
 * 注册
 * @param {*} data
 */
export const register = data => {
  return request.post('/register', data)
}
/**
 * 获取用户信息
 * @param {*} data
 */
export const getUser = () => {
  return request.get('/user')
}
/**
 * 修改密码
 */
export const password = data => {
  return request.post('/user/pwd', data)
}

/**
 * 修改用户信息
 */
export const updateUserInfo = data => {
  return request.put('/user', data)
}
